package study.nzy.com.studydemo;

import android.os.Bundle;
import android.app.Activity;
import android.view.View;

import study.nzy.com.studydemo.utils.ToastUtils;

public class SettingActivity extends Activity implements View.OnClickListener {

    Activity activity;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        activity = this;
        setContentView(R.layout.activity_setting);
        findViewById(R.id.tv_btn_self).setOnClickListener(this);
        findViewById(R.id.tv_btn_nickname).setOnClickListener(this);
        findViewById(R.id.tv_btn_version).setOnClickListener(this);
        findViewById(R.id.tv_btn_contact).setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.tv_btn_self:
                ToastUtils.showToast(activity,"tv_btn_self");
                break;
            case R.id.tv_btn_nickname:
                ToastUtils.showToast(activity,"tv_btn_nickname");
                break;
            case R.id.tv_btn_version:
                ToastUtils.showToast(activity,"tv_btn_version");
                break;
            case R.id.tv_btn_contact:
                ToastUtils.showToast(activity,"tv_btn_contact");
                break;
                default:
        }
    }
}